#! /usr/bin/env python3

class ConetentManage:

    def __enter__(self):
        print("调用__enter__()方法")
        return self

    def show(self):
        print("调用show方法")

    def __exit__(self, exc_type, exc_val, exc_tb):
        print("调用__exit__()方法")


with ConetentManage() as f:
    f.show()


